package yzrilyzr.simplesynth.app;
import android.annotation.TargetApi;
import android.media.midi.MidiDeviceService;
import android.media.midi.MidiReceiver;
import android.os.Build;

@TargetApi(Build.VERSION_CODES.M)
public class MyMidiDeviceService extends MidiDeviceService{
	@Override
	public void onCreate(){
		super.onCreate();
		// 初始化虚拟 MIDI 设备
	}
	@Override
	public MidiReceiver[] onGetInputPortReceivers(){
		// 返回接收器，供其他 App 发送 MIDI 数据到本应用
		return new MidiReceiver[]{new MyMidiReceiver()};
	}
}
